﻿using System.Collections.Specialized;
using System.Web;

namespace BigfootWeb
{
    /// <summary>
    /// The IContext provides a level of abstraction for the application. This is particularly useful for testing
    /// </summary>
    public interface IContext
    {
        /// <summary>
        /// Gets the current context object
        /// </summary>
        HttpContext GetContext();
        /// <summary>
        /// Gets the current request object
        /// </summary>
        HttpRequest GetRequest();
        /// <summary>
        /// Gets the current response object
        /// </summary>
        HttpResponse GetResponse();
        /// <summary>
        /// Gets the httpserverutility used inthe current context
        /// </summary>
        /// <returns></returns>
        HttpServerUtility GetServer();

        /// <summary>
        /// This is a way to inject values into the request. 
        /// Used during testing to simulate parameters sent from the client
        /// As well as when needing some values to be available as if they were part of the request
        /// ****IMPORTANT****
        /// MUST ALWAYS BE CLEARED AFTER USE. THIS HANGS AROUND FOR THE LIFE OF THE APP
        /// </summary>
        NameValueCollection ManualValues{ get; set;}
    }
    
}
